package com.atgion.manager.task;

import com.atgion.manager.mapper.SysOperationLogMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

//定时任务
@Component
public class OrderStatisticsTask {

    @Autowired
    SysOperationLogMapper sysOperationLogMapper;

//  @Scheduled标记为定时任务  cron :表达式设置多久执行一次
//    @Scheduled(cron = "0/5 * * * * ?")
    @Scheduled(cron = "0 0 0 */3 * ?")
    public void testHello(){
        sysOperationLogMapper.clean();
    }
}
